{% extends 'formwork.html' %}

{% block content %}
    <div class="container">
    <h2>提交我的作业</h2>
        <form class="form-horizontal" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            {% for field in form %}
                <div class="form-group">
                    <label class="col-sm-2 control-label">{{ field.label }}</label>
                    <div class="col-sm-7">
                        {{ field }}
                        <span style="color: red;">{{ field.errors.0 }}</span>
                    </div>
                </div>
            {% endfor %}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-8">
                    <input type="submit" value="保 存" class="btn btn-primary">
                </div>
            </div>
        </form>
    </div>
{% endblock %}